package com.yifeng.repo.micro.service.server.engine.manager;

import com.fasterxml.jackson.databind.JsonNode;

/**
 * Created by daibing on 2023/3/16.
 */
public class RequestBodyManager {
    private static final ThreadLocal<JsonNode> BODY_JSON_HOLDER = new ThreadLocal<>();

    public static void set(JsonNode jsonNode) {
        BODY_JSON_HOLDER.set(jsonNode);
    }

    public static JsonNode get() {
        return BODY_JSON_HOLDER.get();
    }

    public static void clear() {
        BODY_JSON_HOLDER.remove();
    }
}
